home *** CD-ROM | disk | FTP | other *** search
/ Family Forum 257 / SOMC Family Forum 257 - Disc 1.iso / somc / magoffer.dir / 00001_Script_Start Movie next >
Text File  |  1998-10-22  |  3KB  |  124 lines

  1.  
  2. on startMovie
  3.    
  4.   glowClear()
  5.   
  6. end
  7.  
  8.  
  9.  
  10.  
  11. --* This handler hides/shows the glow images. eg: glow(5,TRUE) *
  12.  
  13. on glow WHICHSPRITE, TRUEORFALSE
  14.   set the visible of sprite WHICHSPRITE to TRUEORFALSE
  15. end glow
  16.  
  17. --* TURN OF ALL GLOWS ON START
  18. on glowClear
  19.   repeat with i = 10 to 15
  20.     glow(i)
  21.   end repeat
  22. end
  23.  
  24. --* This handler switches the text color for a glow effect. eg.textglow("Hello",1)*
  25.  
  26. on textglow WHICHMEMBER, COLORNUMBER
  27.   set the foreColor of member WHICHMEMBER to COLORNUMBER  
  28. end textglow
  29.  
  30. --* This is for using a HotSpot or Button for closing the window or a overlaid
  31. --* cover up sprite THIS IS AN EXAMPLE NOT A HANDLER
  32.  
  33. --on mouseUp
  34. --  global  enableHotspots
  35. --  doClick()
  36. --  if (the visible of sprite 35) then
  37. --    hideFonts()
  38. --    restoreBI()
  39. --  else
  40. --    close window "BIART"
  41. --    forget window "BIART"
  42. --    tell the stage to enableHotspots()
  43. --  end if
  44. --end mouseUp
  45.  
  46. --* THIS HANDLER EXAMPLE OF DISABLING HOTSPOTS WHEN RUNNING MIAW*
  47. --on mouseEnter
  48. --  if not count(the windowList) then
  49. --    doRollover(52)
  50. --  end if
  51. --end
  52. --
  53. --
  54. --on mouseLeave
  55. --  if not count(the windowList) then
  56. --    doRollout(52)
  57. --  end if
  58. --end
  59.  
  60.  
  61.  
  62. --* THIS HANDLER OPEN AND CENTERS A MOVIE IN A WINDOW *
  63.  
  64. on openMIAW MYWINDOW
  65.   set myRect=the rect of window MYWINDOW
  66.   set myStage=the rect of the Stage
  67.   set myWidth=(getAt(myRect,3)-getAt(myRect,1))
  68.   set myHeight=(getAt(myRect,4)-getAt(myRect,2))
  69.   set myLocH=((getAt(myStage,3)+getAt(myStage,1))/2)-(myWidth/2)
  70.   set myLocV=((getAt(myStage,2)+getAt(myStage,4))/2)-(myHeight/2)
  71.   set myNewRect=rect(myLocH,myLocV,(myLocH+myWidth),(myLocV+myHeight))
  72.   set the rect of window MYWINDOW=myNewRect
  73.   set the windowType of window MYWINDOW to 2
  74.   open window MYWINDOW
  75. end openMIAW
  76.  
  77.  
  78. --* THESE HANDLERS TURN ON A GLOW, TURN POINTER A HAND AND PLAYS A SOUND *
  79. --
  80. --on doRollover numsprite
  81. --  glow(numsprite,TRUE)
  82. --  global mgfinger,mgfingermask
  83. --  cursor[mgfinger,mgfingermask]
  84. --  updatestage
  85. --  puppetsound 1, "rollsound"
  86. --  --  repeat while soundbusy(1)
  87. --  --  end repeat
  88. --end
  89.  
  90.  
  91. --* THIS HANDLER TURNS THE SPRITE PASSED TO IT TO INVISIBLE AND RESETS THE CURSOR
  92. on doRollout numsprite
  93.   glow(numsprite,FALSE)
  94.   cursor 0
  95. end
  96.  
  97. --* PLAYS A CLICK SOUND
  98.  
  99. on doClick
  100.   puppetsound 1,"clicksound"
  101.   updateStage
  102. end
  103.  
  104.  
  105.  
  106.  
  107. on doRollover numsprite,SOUNDNUM
  108.   glow(numsprite,TRUE)
  109.   global finger,fingermask
  110.   cursor[finger,fingermask]
  111.   updatestage  
  112.   case SOUNDNUM of
  113.     1:
  114.       puppetsound 1, "rollsound"
  115.       --  repeat while soundbusy(1)
  116.       --  end repeat
  117.     2:
  118.       puppetsound 1, "rollsound2"
  119.       --  repeat while soundbusy(1)
  120.       --  end repeat      
  121.   end case  
  122. end
  123.  
  124.